package org.yzh.web.mp.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author nick
 * @description 位置信息表
 * @date 2022/3/8
 **/
@Data
public class Location {

    /**
     * 上传时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Long time;

    /**
     * 车辆id
     */
    private String vehicleId;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 扩展状态
     */
    private Integer extStatus;

    /**
     * 经度
     */
    private BigDecimal longitude;

    /**
     * 纬度
     */
    private BigDecimal latitude;

    /**
     * 速度
     */
    private Integer speed;

    /**
     * 高度/海拔
     */
    private Integer high;

    /**
     * 方位
     */
    private Integer orientation;

    /**
     * 里程
     */
    private Double mileage;

    /**
     * 油量
     */
    private Double oil;

    /**
     * 新增时间
     */
    private Long addTime;

    /**
     * 808/809标识(0:808,1:809)
     */
    private Integer flag;

    /**
     * 报警标识
     */
    private Integer warningMark;

    /**
     * 车辆id
     */
    private String cid;


    public com.iov.car.taos.entity.TaosLocation toEntityLocation() {

        com.iov.car.taos.entity.TaosLocation model = new com.iov.car.taos.entity.TaosLocation();
        // model 生成赋值
        model.setTime(this.getTime());
        model.setVehicleId(this.getVehicleId());
        model.setStatus(this.getStatus());
        model.setExtStatus(this.getExtStatus());
        model.setLongitude(this.getLongitude());
        model.setLatitude(this.getLatitude());
        model.setSpeed(this.getSpeed());
        model.setHigh(this.getHigh());
        model.setOrientation(this.getOrientation());
        model.setMileage(this.getMileage());
        model.setOil(this.getOil());
        model.setAddTime(this.getAddTime());
        model.setFlag(this.getFlag());
        model.setWarningMark(this.getWarningMark());
        model.setCid(this.getCid());
        return model;
    }

}
